package com.tedu.egweibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserRegDTO {
    @NotNull
    @Pattern(regexp = "[\\u4e00-\\u9fa5]{1,30}|[a-zA-Z0-9_]{1,30}")
    @ApiModelProperty(value="用户名",required = true,example = "张三")
    private String username;
    @NotNull
    @Pattern(regexp = "[a-zA-Z0-9_]{1,30}")
    @ApiModelProperty(value="密码",required = true,example = "123456")
    private String password;
    @NotNull
    @Pattern(regexp = "[\\u4e00-\\u9fa5]{1,30}|[a-zA-Z0-9_]{1,30}")
    @ApiModelProperty(value="昵称",required = true,example = "阿三")
    private String nickname;
}
